home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 4 / Mac Giga-ROM 4.0 - 1993.toast / FILES / HYP / H-I / HyperScrap.cpt / HyperScrap / stack.txt < prev   
Text File  |  1989-01-09  |  7KB  |  279 lines

  1. -- stack: in
  2. -- format: 8 (HyperCard 1)
  3. -- flags: 0x5000 (can't delete)
  4. -- protect password hash: 0
  5. -- maximum user level: 5 (scripting)
  6. -- window: Rect(x1=0, y1=0, x2=0, y2=0)
  7. -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
  8. -- card dimensions: w=0 h=0
  9. -- scroll: x=0 y=0
  10. -- background count: 2
  11. -- first background id: 2715
  12. -- card count: 10
  13. -- first card id: 2872
  14. -- list block id: 2237
  15. -- print block id: 3490
  16. -- font table block id: 0
  17. -- style table block id: 0
  18. -- free block count: 14
  19. -- free size: 26976 bytes
  20. -- total size: 90112 bytes
  21. -- stack block size: 6144 bytes
  22. -- created by hypercard version: 0x01208000
  23. -- compacted by hypercard version: 0x01208000
  24. -- modified by hypercard version: 0x01208000
  25. -- opened by hypercard version: 0x01208000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x0000220000002200
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0xCC003300CC003300
  30. -- patterns[4]: 0xCC883322CC883322
  31. -- patterns[5]: 0xEE88BB22EE88BB22
  32. -- patterns[6]: 0xEECCBB33EECCBB33
  33. -- patterns[7]: 0xFFCCFF33FFCCFF33
  34. -- patterns[8]: 0xFFEEFFBBFFEEFFBB
  35. -- patterns[9]: 0xFFFFFFBBFFFFFFBB
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0x8822552288225522
  44. -- patterns[18]: 0x8855225588552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0x8000000000000000
  47. -- patterns[21]: 0xAA55AA55AA55AA55
  48. -- patterns[22]: 0x038448300C020101
  49. -- patterns[23]: 0x8244394482010101
  50. -- patterns[24]: 0x8814224188412214
  51. -- patterns[25]: 0x8080413E080814E3
  52. -- patterns[26]: 0x22048C7422179810
  53. -- patterns[27]: 0xBE808808EB088880
  54. -- patterns[28]: 0x25C8328964244C92
  55. -- patterns[29]: 0xA29C41BE2AC914EB
  56. -- patterns[30]: 0x40A00000040A0000
  57. -- patterns[31]: 0x8040200002040800
  58. -- patterns[32]: 0xAA00800088008000
  59. -- patterns[33]: 0xFF80808080808080
  60. -- patterns[34]: 0x081C22C180010204
  61. -- patterns[35]: 0xFF808080FF080808
  62. -- patterns[36]: 0xF87422478F172271
  63. -- patterns[37]: 0xBF00BFBFB0B0B0B0
  64. -- patterns[38]: 0xFF7FBE5DA2418000
  65. -- patterns[39]: 0xFAF5FAF5A050A050
  66. -- checksum: 0x0
  67. ----- HyperTalk script -----
  68. on openStack
  69.   set userLevel to 5
  70. end openStack
  71.  
  72. on doMenu which
  73.   if the optionKey is down then
  74.     set userLevel to 5
  75.     if which is "Help" then
  76.       push card
  77.       go to card "Quick Reference" of stack "HyperScrap"
  78.       exit doMenu
  79.     end if
  80.     if which contains "Paste" then
  81.       push card
  82.       if which is not "Paste" then
  83.         put character 1 of word 2 of which into whatLetter
  84.       end if
  85.       ask "Paste:  F)ield, B)utton, T)ext, P)icture" with whatLetter
  86.       if it is empty then exit doMenu
  87.       if it is "B" then
  88.         go to card "Buttons" of stack "HyperScrap"
  89.         show button "Paste"
  90.         choose button tool
  91.         click at the loc of card button "Paste"
  92.         doMenu "Cut Button"
  93.         doMenu "Paste Button"
  94.         choose browse tool
  95.         exit doMenu
  96.       end if
  97.       if it is "T" then
  98.         go to card "Text" of stack "HyperScrap"
  99.         show button "Paste"
  100.         choose browse tool
  101.         exit doMenu
  102.       end if
  103.       if it is "F" then
  104.         go to card "Fields" of stack "HyperScrap"
  105.         show button "Paste"
  106.         choose browse tool
  107.         exit doMenu
  108.       end if
  109.       if it is "P" then
  110.         push card
  111.         ask "Look up which graphic? (L for a list)" with "L"
  112.         if it is empty then exit doMenu
  113.         if it is "L" then
  114.           set cursor to 4
  115.           lock screen
  116.           go to card "Graphics" of stack "HyperScrap"
  117.           choose field tool
  118.           click at the loc of card field "Lkqy"
  119.           doMenu "Copy Field"
  120.           put empty into graphicName
  121.           repeat for the number of cards in background "Graphics"
  122.             put graphicName & field 1 & "," into graphicName
  123.             go to next card
  124.           end repeat
  125.           put empty into char 1 of graphicName
  126.           pop card
  127.           doMenu "Paste Field"
  128.           unlock screen
  129.           put "The names of the graphics are..."
  130.           wait 1 second
  131.           hide message
  132.           repeat with x = 1 to the number of items in graphicName
  133.             put item x of graphicName into line x of card field "Lkqy"
  134.           end repeat
  135.           choose browse tool
  136.           exit doMenu
  137.         end if
  138.         put it into lookUpWhatGraphic
  139.         pop card
  140.         go to background "Graphics" of stack "HyperScrap"
  141.         go to card lookUpWhatGraphic
  142.         if the result is not empty then
  143.           answer "That graphic was not found..." with "OK"
  144.           pop card
  145.           show button "Paste"
  146.           exit doMenu
  147.         end if
  148.         choose browse tool
  149.         if the short name of this card is lookUpWhatGraphic then exit doMenu
  150.       end if
  151.     end if
  152.   end if
  153.   pass doMenu
  154. end doMenu
  155.  
  156. on idle
  157.   if message is "‚Ć" then send "‚Ć" to this stack
  158.   if message is "¬©" then send "¬©" to this stack
  159. end idle
  160.  
  161. on mouseWithin
  162.   if the optionKey is down and the commandKey is down then
  163.     wait 1 second
  164.     if the optionKey is down and the commandKey is down then
  165.       set userLevel to 5
  166.       set cursor to watch
  167.       push card
  168.       choose field tool
  169.       click at the mouseLoc
  170.       doMenu "Copy Field"
  171.       lock screen
  172.       go to card "Fields" of stack "HyperScrap"
  173.       doMenu "Paste Field"
  174.       pop card
  175.       unlock screen
  176.       choose browse tool
  177.       exit mouseWithin
  178.     end if
  179.   end if
  180.   if the commandKey is down then
  181.     wait 1 second
  182.     if the commandKey is down then
  183.       set userLevel to 5
  184.       set cursor to watch
  185.       push card
  186.       choose button tool
  187.       click at the mouseLoc
  188.       doMenu "Copy Button"
  189.       lock screen
  190.       go to card "Buttons" of stack "HyperScrap"
  191.       doMenu "Paste Button"
  192.       pop card
  193.       unlock screen
  194.       choose browse tool
  195.       exit mouseWithin
  196.     end if
  197.   end if
  198. end mouseWithin
  199.  
  200. on "¬©"
  201.   set userLevel to 5
  202.   set cursor to 4
  203.   push card
  204.   lock screen
  205.   ask "What do you want to call this graphic?"
  206.   if it is empty then
  207.     pop card
  208.     put empty into message
  209.     hide message
  210.     exit "¬©"
  211.   end if
  212.   if it is "L" then
  213.     answer "You can't name your graphic 'L'" with "OK"
  214.     send "¬©"
  215.     exit "¬©"
  216.   end if
  217.   if the number of characters in it > 16 then
  218.     answer "Please pick a name 16 letters or shorter." with "OK"
  219.     send "¬©"
  220.     exit "¬©"
  221.   end if
  222.   go to card "Graphics" of stack "HyperScrap"
  223.   put it into graphicName
  224.   doMenu "New Card"
  225.   set the name of this card to graphicName
  226.   put graphicName into field "Graphic Name"
  227.   doMenu "Paste Picture"
  228.   put empty into message
  229.   hide message
  230.   pop card
  231.   unlock screen
  232. end "¬©"
  233.  
  234. on "‚Ć"
  235.   push card
  236.   set userLevel to 5
  237.   go to card "Text" of stack "HyperScrap"
  238.   put the number of card fields into numCF
  239.   repeat with x = 1 to the number of card fields
  240.     if card field x is empty then
  241.       put x - 1 into whatfield
  242.       if whatField is 0 then
  243.         send tabKey
  244.         doMenu "Paste Text"
  245.         pop card
  246.         put empty into message
  247.         hide message
  248.         exit "‚Ć"
  249.       end if
  250.       click at the loc of card field whatField
  251.       send tabKey
  252.       doMenu "Paste Text"
  253.       pop card
  254.       put empty into message
  255.       hide message
  256.       exit "‚Ć"
  257.     end if
  258.   end repeat
  259.   answer "There are no empty card fields..." with "OK"
  260.   put empty into message
  261.   hide message
  262.   pop card
  263. end "‚Ć"
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.